package org.example.myleet.p429;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.JsonUtils;
import org.example.myleet.Utils.Parser;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue("[[1],[3,2,4],[5,6]]".equals(JsonUtils.toJson(solution.levelOrder(Parser.parseNChildrenTree(new Integer[]{1,null,3,2,4,null,5,6})))));
        Assert.isTrue("[[1],[2,3,4,5],[6,7,8,9,10],[11,12,13],[14]]".equals(JsonUtils.toJson(solution.levelOrder(Parser.parseNChildrenTree(new Integer[]{1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14})))));
        Assert.isTrue("[]".equals(JsonUtils.toJson(solution.levelOrder(Parser.parseNChildrenTree(new Integer[]{})))));
    }
}
